package com.base.springboot.starter.redisson.autoconfigure;

import com.base.springboot.starter.redisson.service.RedissonLockServiceImpl;
import com.base.springboot.starter.redisson.service.RedissonClusterConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 配置类
 *
 * @Author：admin
 * @Date 2020/6/11 13:47
 */
@Configuration
@Import(RedissonClusterConfiguration.class)
public class RedissonAutoConfiguration {

    @Bean
    @ConditionalOnClass
    public RedissonLockServiceImpl initRedisDistributedLocker() {
        return new RedissonLockServiceImpl();
    }
}
